home *** CD-ROM | disk | FTP | other *** search
- Path: comma.rhein.de!yaps!arno
- From: arno@yaps.rhein.de (Arno Eigenwillig)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Sorting a list
- Message-ID: <dFiiy*6ig@yaps.rhein.de>
- Date: Sun, 24 Mar 1996 15:25:01 +0100
- References: <272.6650T63T1340@sn.no> <314F9F68.48E2@sapiens.com> <19960321.7D0ECE0.76B4@mojaveg.ridgecrest.ca.us>
- Organization: Yet Another Private Site in Meckenheim, Germany
- X-Copyright: This article may not be distributed on a CD-ROM
- or in printed form without prior written consent of the author.
- X-Newsreader: Arn V 1.04
-
- In article <19960321.7D0ECE0.76B4@mojaveg.ridgecrest.ca.us>,
- Everett M. Greene writes:
-
- > Any and all sorting algorithms are faster
- > than bubble sort.
-
- No. From The Jargon File V3.3.1, entry "bogo-sort":
-
- Bogo-sort is equivalent to repeatedly throwing a deck of cards in
- the air, picking them up at random, and then testing whether they
- are in order.
-
- In the average case, Bogo-sort is slower.
-
- However, the question is, wheter this is an algorithm: If the sequence
- of the cards (or in generic terms, the sequence of the randomly permu-
- tated elements) is generated truly random each time, bogo-sort is not
- guaranteed to terminate in finite time (which is a requirement for an
- algorithm).
-
- PS: :o)
-
- -- __
- __/// Arno Eigenwillig /\ <arno@yaps.rhein.de> \/ PGP key available.
- \XX/ V+49-2225-5870 /\ <Arnooo @ #amigager> \/ MIME 8bit welcome.
-